﻿@inherits Project.Module.View.EventView
@{
    ViewBag.Title = "Sự Kiện";
    Layout = "~/Views/Home/_Master.cshtml";
}
<div id="noidung">
    <h1>Sự kiện</h1>
    @{
        if (this.listEvent != null && this.listEvent.ToList().Count > 0)
        {
            foreach (var item in this.listEvent)
            {
        <div class="post-item">
            <div class="metadata">
                <a href="/su-kien?id=@item.EventID?@item.url"><img src="@item.ImagePath" alt="" /></a>
                <ul class="postdata">
                    <li><span class="post">@item.CreatedBy</span> </li>
                    <li><span class="date">@{
                        if(item.CreatedDate != Convert.ToDateTime("01/01/1900")){
                           @item.CreatedDate.ToString("dd/mm/yyyy");
                        }}
                        </span>
                    </li>
                    <li><span class="comments"><a href="/su-kien?id=@item.EventID?@item.url">@item.totalComment</a></span> </li>
                </ul>
            </div>
            <!--End .metadata-->
            <h1><a href="/su-kien?id=@item.EventID?@item.url">@item.title</a></h1>
            <p>@item.summary</p>
            <p><a class="more-link floatright" href="/su-kien?id=@item.EventID?@item.url">Chi tiết</a></p>
        </div>
        <!--End .post-item-->
            }
        }
        else
        { 
                            <h2>Không có sự kiện nào</h2>
        }
                    }
</div>
<!--end #noidung-->
